# Makefile
# Qui fonctionne ^^

PRG = search

# Fichiers dans l'ordre
ML = search.ml
MLI = 

CMO=${ML:.ml=.cmo}
CMX=${ML:.ml=.cmx}
CMI=${ML:.mli=.cmi}

OCAMLFLAGS = -I +lablgtk2
OCAMLLD = str.cmxa lablgtk.cmxa
OCAMLOPT = ocamlopt.opt
OCAMLC = ocamlc.opt
OCAMLDEP = ocamldep

${PRG}: ${CMX}
	${OCAMLOPT} ${OCAMLFLAGS} ${OCAMLLD} -o $@ ${CMX}	

.SUFFIXES: .ml .mli .cmo .cmx .cmi

.ml.cmx: 
	${OCAMLOPT} ${OCAMLFLAGS} ${OCAMLLD} -c $<

.ml.cmo: 
	${OCAMLC} -c $<

.mli.cmi: 
	${OCAMLC} -c $<

clean:
	rm -f *~ *.o *.cm? *mli ${PRG}

fullclean: clean
	rm -f .depend

depend: .depend
.depend: ${ML} ${MLI}
	rm -f .depend
	${OCAMLDEP} ${ML} ${MLI} > .depend
			 
include .depend
